package com.ruoyi.project.system.punishment.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.project.system.punishment.mapper.PunishmentMapper;
import com.ruoyi.project.system.punishment.domain.Punishment;
import com.ruoyi.project.system.punishment.service.IPunishmentService;
import com.ruoyi.common.utils.text.Convert;

/**
 * 惩罚管理Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-07-05
 */
@Service
public class PunishmentServiceImpl implements IPunishmentService 
{
    @Autowired
    private PunishmentMapper punishmentMapper;

    /**
     * 查询惩罚管理
     * 
     * @param iid 惩罚管理主键
     * @return 惩罚管理
     */
    @Override
    public Punishment selectPunishmentByIid(Long iid)
    {
        return punishmentMapper.selectPunishmentByIid(iid);
    }

    /**
     * 查询惩罚管理列表
     * 
     * @param punishment 惩罚管理
     * @return 惩罚管理
     */
    @Override
    public List<Punishment> selectPunishmentList(Punishment punishment)
    {
        return punishmentMapper.selectPunishmentList(punishment);
    }

    /**
     * 新增惩罚管理
     * 
     * @param punishment 惩罚管理
     * @return 结果
     */
    @Override
    public int insertPunishment(Punishment punishment)
    {
        return punishmentMapper.insertPunishment(punishment);
    }

    /**
     * 修改惩罚管理
     * 
     * @param punishment 惩罚管理
     * @return 结果
     */
    @Override
    public int updatePunishment(Punishment punishment)
    {
        return punishmentMapper.updatePunishment(punishment);
    }

    /**
     * 批量删除惩罚管理
     * 
     * @param iids 需要删除的惩罚管理主键
     * @return 结果
     */
    @Override
    public int deletePunishmentByIids(String iids)
    {
        return punishmentMapper.deletePunishmentByIids(Convert.toStrArray(iids));
    }

    /**
     * 删除惩罚管理信息
     * 
     * @param iid 惩罚管理主键
     * @return 结果
     */
    @Override
    public int deletePunishmentByIid(Long iid)
    {
        return punishmentMapper.deletePunishmentByIid(iid);
    }
}
